#########################
#   Author : leilei qin    #
#   Date : 2025/06/18   #
#   Id : SM2892         #
#########################

from compareResult.compareUtils import Compare
from dbResps.queryTaxDetailReport import *
from apiRespsAnalyze.queryTaxDetailReportFromApi import *

# 非当天 6/17号
startTime = 1718557200000
endTime = 1718643599000


getTaxDetailFromDB_Result = getQueryTaxDetailReportFromDB(startTime, endTime)
dateFormatTemp1 = lambda x: datetime.strptime(str(dc.timestamp2Data(x)), "%Y/%m/%d %H:%M:%S").strftime("%Y/%m/%d")
getTaxDetailFromApi_Result = queryTaxDetailReportResult(startTime, endTime)

if __name__ == "__main__":
    compareResult = Compare.compare(getTaxDetailFromDB_Result, getTaxDetailFromApi_Result)
    if compareResult:
        print('compare success')
    else:
        print('compare fail')
        print(getTaxDetailFromDB_Result)
        print(getTaxDetailFromApi_Result)